<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<style>
    /* 内外边距全部清空 */
    *{
        margin: 0;
        padding: 0;
    }
    /* 充满全屏 */
    html,body{
        width: 100%;
        height: 100%;
    }
    /* 背景颜色 */
    body{
        background-color: pink;
        display: flex;
        flex-direction: row;
        /* 垂直居中*/
        align-items: center;
        /* 水平居中 */
        justify-content: center;
    }
    /*心盒子 */
    .heart{
        width: 200px;
        height: 200px;
        background-color: red;
        position: relative;
        transform: rotate(45deg);
        animation: heartbit 1.5s alternate infinite;
        box-shadow: 0 0 30px red;
        
    }
    .heart::before{
        content:"" ;
        width: 200px;
        height: 100px;
        background-color: red;
        position:absolute;
        left: 0;
        top: -99px;
        border-radius: 100px 100px 0 0;
        box-shadow: 0 0 30px red;
    }
    .heart::after{
        content:"" ;
        width: 100px;
        height: 200px;
        background-color: red;
        position:absolute;
        /* ieft:宽 */
        left: -99px;
        /* top:高 */
        top: 0;
        border-radius:100px 0 0 100px;
        box-shadow: 0 0 30px red;
    }
    /* 实现动画 */
        @keyframes heartbit{
            0%{
                transform: rotate(45deg) scale(0.6);
            }
            100%{
                transform: rotate(45deg) scale(1.6);
            }

        }
        .mz{
            transform: rotate(-45deg);
            width: 60px;
            height: 29px;
        }
        
</style>
</head>
<body>
    <div class="heart"  ><h1 class="mz">你好</h1></div>
    
    
</body>
</html>